//
//  UserCenterViewController.m
//  YellowBridge
//
//  Created by 王右 on 2018/12/9.
//  Copyright © 2018年 王右. All rights reserved.
//

#import "UserCenterViewController.h"
#import "LoginViewController.h"
#import "ResetPasswordViewController.h"
@interface UserCenterViewController ()
@property (weak, nonatomic) IBOutlet UILabel *userNameLabel;
@property (weak, nonatomic) IBOutlet UIButton *logoutButton;
@property (strong, nonatomic) IBOutlet UILabel *accountNameLabel;

@end

@implementation UserCenterViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.edgesForExtendedLayout = UIRectEdgeNone;
    self.title = @"个人中心";
    _logoutButton.layer.cornerRadius = 22.5;
    _logoutButton.layer.masksToBounds = YES;
    
    _accountNameLabel.text = User_Account;
}

- (IBAction)logoutAction:(id)sender {
    
    [[CCCache defaultManager]removeObjectForKey:Login_User_Info_Model];
    
    [UIApplication sharedApplication].delegate.window.rootViewController = [LoginViewController new];
}

- (IBAction)forgetPasswordAction:(id)sender {
    [self.navigationController pushViewController:[ResetPasswordViewController new] animated:YES];
}

@end
